<template>
	<view class="module flex_ZC">
		<!-- #ifdef H5 -->
			<uNavbar title=" "> </uNavbar>
		<!-- #endif -->
		<!-- #ifdef MP-WEIXIN -->
		<view class="custom_box">
			<image class="indexbg" :src="baseUrl +'/static/image/indexbg.png'" mode="aspectFill"></image>
			<view :style="{height: statusBarHeight + 'px', backgroundColor: backgroundColor }"></view>
			<view class="custom_nav " :style="{height: titleHeight + 'px', backgroundColor: backgroundColor}">
				<image class="goback" :src="baseUrl +'/static/icon/i_left.png'" mode="aspectFill" @click="leftClick"></image>
				<text class="f28 c3">入驻福叠猫</text>
			</view>
		</view>
		<view :style="{height: statusBarHeight + titleHeight + 'px'}" style="width: 100%;"></view>
		<!-- #endif -->
		
		<view class="submit flex_ZC">
			<image :src="baseUrl +'/static/image/success.png'" mode="aspectFill"></image>
			<text class="f40 c3 fw7 submit_txt">提交成功</text>
			<!-- <text class="f24 c9 centers">工作人员将会在3个工作日内审核您的提交，敬请留意通知</text> -->
		</view>

		<view class="btns flex_ld">
			<view class="service flex_dq">
				<text class="service1" @click="nextStep">确认</text>
			</view>
		</view>
		<view class="empty3"></view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: 0, //状态栏高度
				titleHeight: 0, // 标题栏高度
				backgroundColor: '',
				baseUrl: this.$imageBaseUrl,
				
				payType:''
				
				
			}
		},

		onReady() {
			// #ifdef MP-WEIXIN 
			uni.getSystemInfo({
				success: res => {
					this.statusBarHeight = res.statusBarHeight
					console.log(this.statusBarHeight);
				}
			})
			const custombar = uni.getMenuButtonBoundingClientRect();
			this.titleHeight = (custombar.top - this.statusBarHeight) * 2 + custombar.height
			console.log(this.titleHeight);
			// #endif

		},
		onLoad(e) {
			this.payType = e.payType
		},
		
		methods: {
			leftClick() {
				//获取页面栈的长度
				const canNavBack = getCurrentPages()
				console.log(canNavBack.length);
				// 判断是否刷新了浏览器，刷新了浏览器，页面栈只有当前一个
				if (canNavBack.length > 1) {
					uni.navigateBack({
						delta: 1
					})
				} else { 
					uni.switchTab({
						url: '/pages/index/cloudCatIndex'
					})
				}
			},

			// 下一步
			nextStep() {
				if(this.payType == 2){
					uni.reLaunch({
						url: '/pagesMy/businessJoin/joinIndexCopy'
					})
				}else{
					uni.reLaunch({
						url: '/pagesMy/businessJoin/joinIndex'
					})
				}
			}
		},
		// 页面滚动
		onPageScroll: function(e) {
			const scrollTop = e.scrollTop; // 获取页面滚动位置
			// 根据滚动位置修改状态栏样式
			if (scrollTop > 20) {
				this.backgroundColor = '#ffffff';
			} else {
				this.backgroundColor = '';
			}
			// console.log("滚动距离为：" + e.scrollTop);
		},
	}
</script>

<style scoped>
	.module {
		width: 750rpx;
		margin: 0 auto;
	}

	.custom_box {
		width: 750rpx;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 8;
		padding-bottom: 10rpx;
		opacity: 1;
	}

	.indexbg {
		position: absolute;
		top: 0;
		left: 0;
		width: 750rpx;
		height: 460rpx;
		z-index: 1;
	}

	.custom_nav {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 750rpx;
		font-size: 36rpx;
		z-index: 9;
		color: #FFFFFF;
	}

	.goback {
		position: absolute;
		left: 30rpx;
		text-align: center;
		width: 40rpx;
		height: 40rpx;
		z-index: 9;
	}
	.submit{
		width: 496rpx;
		margin-top: 186rpx;
		
	}
	.submit>image{
		width: 198rpx;
		height: 198rpx;
	}
	.submit_txt{
		margin: 30rpx 0 10rpx;
	}
	.centers{
		text-align: center;
	}
	


	.btns {
		position: fixed;
		bottom: 0rpx;
		left: 50%;
		transform: translateX(-50%);
		width: 690rpx;
		height: 150rpx;
		background: #f8f8f8;
	}

	.service1 {
		width: 686rpx;
		height: 88rpx;
		line-height: 88rpx;
		font-size: 32rpx;
		color: #333333;
		font-weight: 500;
		text-align: center;
		background: #FFCC28;
		border-radius: 20rpx;
	}
</style>